package edu.gznu.ics.fast.pulsar.controller.prestoacc.picController;

import edu.gznu.ics.fast.pulsar.model.vo.prestoacc.pic.CompareMainVO;
import edu.gznu.ics.fast.pulsar.service.prestoacc.picService.CompareMainService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by ydw on 2018/3/25.
 */
@Controller
public class CompareMainController {
    @Autowired
    CompareMainService compareMainService;

    @RequestMapping(method = RequestMethod.POST, value = "/queryComMainByDate", produces = "application/json;charset=UTF-8")
    @ResponseBody
    public List<CompareMainVO> queryComMainByDate(@RequestBody String date){
        System.out.println("***********"+date);
        date=date.replaceAll("-","");
        List<CompareMainVO> list=compareMainService.queryComMainByDate(date);
        System.out.println("++++"+list.isEmpty()+"+++"+list.size()+"+++");
        return list;
    }

}
